home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / IEditor / ARexx / ShadowText.ie < prev    next >
Encoding:
Text File  |  1997-06-17  |  777 b   |  53 lines

  1. /*
  2.     ShadowText
  3.     Add a "shadow" to an IntuiText
  4. */
  5.  
  6. OPTIONS RESULTS
  7.  
  8. SIGNAL ON ERROR
  9.  
  10. ADDRESS 'IEDITOR.1'
  11.  
  12.  
  13. /* Ask the user to select a text */
  14.  
  15. 'GETITEXT'
  16. which = result
  17.  
  18.  
  19. /* Get the text's attrs */
  20.  
  21. 'GETITEXTATTR' which txt
  22.  
  23.  
  24. /* Get the Shadow Pen color number */
  25.  
  26. 'GETDRIPEN' 4
  27.  
  28.  
  29. /* Change the selected text (the shadow must be drawn before the
  30.    normal text) and move it a pixel down and two right           */
  31.  
  32. 'SETITEXTATTR' which 'FP' result 'M 0 X' txt.leftedge+2 'Y' txt.topedge+1
  33.  
  34.  
  35. /* Add the new text */
  36.  
  37. 'ADDITEXT' txt.frontpen txt.backpen '0' txt.leftedge txt.topedge '"'txt.text'"'
  38. newone = result
  39.  
  40.  
  41. /* If the old text has a font, set it */
  42.  
  43. if txt.font >= 0 then 'SETITEXTATTR' newone 'FONT' txt.font
  44.  
  45. EXIT
  46.  
  47.  
  48. ERROR:
  49.  
  50. say 'Error' RC 'on line' SIGL
  51.  
  52. EXIT RC
  53.